from langchain_ollama import OllamaEmbeddings

model = OllamaEmbeddings(model="nomic-embed-text")

res = model.embed_query('这是第一个测试文档')
print('向量:',res)
print('向量长度:',len(res))